package com.nanyang.tms.dao.receipt;

import com.nanyang.tms.domain.receipt.ReceiptBillDO;
import com.nanyang.tms.domain.receipt.ReceiptBillQuery;
import com.nanyang.tms.domain.receipt.ReceiptBillVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>Description:()</p>
 *
 * @author lv
 * @date 2022年11月12日 下午10:58:28
 * @Copyright Copyright (c) 2020 www.nanyang.cn Inc. All rights reserved.
 */
@Mapper
public interface ReceiptBillDao {
    /**
     * <p>deleteByPrimaryKey</p>
     * <p>Description:(根据主键删除)</p>
     *
     * @param id
     * @return int
     */
    int deleteByPrimaryKey(Long id);

    /**
     * <p>insert</p>
     * <p>Description:(新增（所有列）)</p>
     *
     * @param record
     * @return int
     */
    int insert(ReceiptBillDO record);


    /**
     * <p>selectByPrimaryKey</p>
     * <p>Description:(根据主键查询)</p>
     *
     * @param id
     * @return ReceiptBillDO
     */
    ReceiptBillDO selectByPrimaryKey(Long id);

    /**
     * <p>updateByPrimaryKeySelective</p>
     * <p>Description:(修改(选择的列))</p>
     *
     * @param record
     * @return int
     */
    int update(ReceiptBillDO record);

    /**
     * <p>countReceiptBill</p>
     * <p>Description:总数</p>
     *
     * @param query
     * @return
     */
    Integer countReceiptBill(ReceiptBillQuery query);

    /**
     * <p>listReceiptBill</p>
     * <p>Description:列表</p>
     *
     * @param query
     * @return
     */
    List<ReceiptBillVO> listReceiptBill(ReceiptBillQuery query);
    /**
     * <p>updateState</p>
     * <p>Description:(完成总单)</p>
     *
     * @param record
     * @return int
     */
    int updateState(ReceiptBillDO record);
    /**
     * <p>updateState</p>
     * <p>Description:(作废总单)</p>
     *
     * @param record
     * @return int
     */
    int cancelState(ReceiptBillDO record);
    /**
     * <p>updateState</p>
     * <p>Description:(累加所有数值)</p>
     *
     * @param record
     * @return int
     */
    
    int updateReceiptAccrual(ReceiptBillDO record); 
    
    ReceiptBillVO getReceiptBillByCode(String receiptBillCode);
    

}